<?php echo form_open_multipart('training/do_upload/' . $trainingID);?>

<input type="file" name="userfile" size="20" />
<br /><br />
<input type="submit" value="upload" />

    <?php if(isset($error) AND $error): ?>
    <div class="alert alert-danger">
            <?php echo $error;?>
    </div>
    <?php endif; ?>

<?php echo form_close(); ?>

<?php if(isset($attachment_id)) echo $attachment_id; ?>
